package com.gbiac.modules.monitor.entity;

import java.io.Serializable;
import java.util.Date;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.TableLogic;
import lombok.Data;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.springframework.format.annotation.DateTimeFormat;
import org.jeecgframework.poi.excel.annotation.Excel;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

/**
 * @Description: 规则配置
 * @Author: jeecg-boot
 * @Date:   2024-11-30
 * @Version: V1.0
 */
@Data
@TableName("gbiac_rule")
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = false)
@ApiModel(value="gbiac_rule对象", description="规则配置")
public class Rule implements Serializable {
    private static final long serialVersionUID = 1L;

    public static class Key {
        public static class Attendance {
            public static final String ATTENDANCE = "attendance";
            public static class Control {
                public static final String CONTROL = "attendance:control";
                public static class Day {
                    public static final String START_TIME = "attendance:control:day:startTime";
                    public static final String END_TIME = "attendance:control:day:endTime";
                }

                public static class Night1 {
                    public static final String START_TIME = "attendance:control:night1:startTime";
                    public static final String END_TIME = "attendance:control:night1:endTime";
                }

                public static class Night2 {
                    public static final String START_TIME = "attendance:control:night2:startTime";
                    public static final String END_TIME = "attendance:control:night2:endTime";
                }
            }

            public static class Operation {
                public static final String OPERATION = "attendance:operation";
                public static class Day {
                    public static final String START_TIME = "attendance:operation:day:startTime";
                    public static final String END_TIME = "attendance:operation:day:endTime";
                }

                public static class Night1 {
                    public static final String START_TIME = "attendance:operation:night1:startTime";
                    public static final String END_TIME = "attendance:operation:night1:endTime";
                }

                public static class Night2 {
                    public static final String START_TIME = "attendance:operation:night2:startTime";
                    public static final String END_TIME = "attendance:operation:night2:endTime";
                }
            }
        }

        public static class ViolationRule {
            public static final String LEAVE_GROUP = "violationRule";
            public static final String LEAVE_TEMP_NO = "violationRule:leaveTempNo";
            public static final String LEAVE_TEMP = "violationRule:leaveTemp";
            public static final String PHONE = "violationRule:phone";
            public static final String SLEEP = "violationRule:sleep";
            public static final String ONLY_NOTICE = "violationRule:onlyNotice";

            public static class LeaveTempNo {
                public static final String TIME = "violationRule:leaveTempNo:time";
                public static final String NOTICE_NUM = "violationRule:leaveTempNo:noticeNum";
            }

            public static class LeaveTemp {
                public static final String TIME = "violationRule:leaveTemp:time";
            }

            public static class Phone {
                public static final String SWITCH = "violationRule:phone:switch";
                public static final String NOTICE_NUM = "violationRule:phone:noticeNum";
            }

            public static class Sleep {
                public static final String TIME = "violationRule:sleep:time";
                public static final String NOTICE_NUM = "violationRule:sleep:noticeNum";
            }

            public static class OnlyNotice {
                public static final String START_TIME = "violationRule:onlyNotice:startTime";
                public static final String END_TIME = "violationRule:onlyNotice:endTime";
            }
        }
    }

	/**ID*/
	@TableId(type = IdType.ASSIGN_ID)
    @ApiModelProperty(value = "ID")
    private String id;
	/**创建人*/
    @ApiModelProperty(value = "创建人")
    private String createBy;
	/**创建时间*/
	@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty(value = "创建时间")
    private Date createTime;
	/**更新人*/
    @ApiModelProperty(value = "更新人")
    private String updateBy;
	/**更新时间*/
	@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty(value = "更新时间")
    private Date updateTime;
	/**删除标识*/
	@Excel(name = "删除标识", width = 15)
    @ApiModelProperty(value = "删除标识")
    @TableLogic
    private Integer delFlag;
	/**规则key*/
	@Excel(name = "规则key", width = 15)
    @ApiModelProperty(value = "规则key")
    private String ruleKey;
	/**规则中文名*/
	@Excel(name = "规则中文名", width = 15)
    @ApiModelProperty(value = "规则中文名")
    private String text;
	/**规则值*/
	@Excel(name = "规则值", width = 15)
    @ApiModelProperty(value = "规则值")
    private String val;
	/**版本号*/
	@Excel(name = "版本号", width = 15)
    @ApiModelProperty(value = "版本号")
    private Integer ver;
}
